package models

import (
	"gorm.io/gorm"
	"hitme/go-api/modules/db"
)

var FeedBackModel = new(FeedBack)

// 反馈表
type FeedBack struct {
	db.CommonModel
	Uid     uint64 `gorm:"default:0;NOT NULL;comment:规格ID" json:"spec_id"`
	Contact string `gorm:"type:varchar(100);default:'';NOT NULL;comment:联系方式" json:"contact"`
	Content string `gorm:"type:varchar(200);default:'';NOT NULL;comment:内容" json:"content"`
}

func (m *FeedBack) TableName() string {
	return "feed_back"
}

func (m *FeedBack) Model() *gorm.DB {
	return db.MysqlDB.Model(&m)
}